package top.jle.wx.proxy.constant;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

public interface SNSScope {

    String SNSAPI_BASE = "snsapi_base";

    String SNSAPI_USERINFO = "snsapi_userinfo";


    @Schema(title="JSSDK配置对象")
    @Getter
    @Setter
    class JSSDKConfig {
        @Schema(title="DEBUG模式 强制false 若要开启获取后自行修改")
        private Boolean debug;
        @Schema(title="公众号APPID")
        private String appId;
        @Schema(title="时间戳 签名因子")
        private Long timestamp;
        @Schema(title="随机字符 签名因子")
        private String nonceStr;
        @Schema(title="签名（微信验证）")
        private String signature;

        public Boolean getDebug() {
            return debug;
        }

        public void setDebug(Boolean debug) {
            this.debug = debug;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public Long getTimestamp() {
            return timestamp;
        }

        public void setTimestamp(Long timestamp) {
            this.timestamp = timestamp;
        }

        public String getNonceStr() {
            return nonceStr;
        }

        public void setNonceStr(String nonceStr) {
            this.nonceStr = nonceStr;
        }

        public String getSignature() {
            return signature;
        }

        public void setSignature(String signature) {
            this.signature = signature;
        }
    }

    @Schema(title="小程序Code2Session结果")
    @Getter
    @Setter
    class Code2SessionResponse{
        @Schema(title="OPENID")
        private String openid;
        @Schema(title="会话密钥")
        private String session_key;
        @Schema(title="用户在开放平台的唯一标识符，在满足 UnionID 下发条件的情况下会返回")
        private String unionid;
    }
}
